package com.xuelang.pipeline.worker.app.common.util;

import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

/**
 * @author liuyuan.ly
 * @since 2024/5/29 14:21
 */
public class VerifyUtil {

    private VerifyUtil(){}
    public static void verifyStringNotBlank(String field, String errorInfo) {
        if (StringUtils.isBlank(field)) {
            throw new RuntimeException(errorInfo);
        }
    }

    public static void ObjectNotNull(Object obj,String errorInfo){
        Objects.requireNonNull(obj, errorInfo);
    }
}
